<?php
    include "Uploader.class.php";
    /* 上传配置 */
    $base64 = "upload";
    $config = array(
        "pathFormat" => $CONFIG['imagePathFormat'],
        "maxSize" => $CONFIG['imageMaxSize'],
        "allowFiles" => $CONFIG['imageAllowFiles']
    );
    $fieldName = $CONFIG['imageFieldName'];
    /* 生成上传实例对象并完成上传 */
    $up = new Uploader($fieldName, $config, $base64);
    /* 返回数据 */
    $data = $up->getFileInfo();
    return json_encode($data);